<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>回显多选框</title>
</head>
<body>
<h2>回显多选框</h2>
<form th:action="@{/save/paige}" method="post">
    paigeId: <input type="text" th:value="${paige.paigeId}"/><br>
    paigeName: <input type="text" th:value="${paige.paigeName}"/><br>
    season-radio:
    <input type="radio" th:each="season:${seasonList}"
                         th:value="${season.submitValue}"
                         th:text="${season.showForUserValue}"
                         th:checked="${season.submitValue == paige.season.submitValue}"/><br>
    season-select:
    <select name="submitValueSelect">
        <option th:each="season:${seasonList}" th:value="${season.submitValue}"
                th:text="${season.showForUserValue}"
                th:selected="${season.submitValue == paige.season.submitValue}"/>
    </select><br>
    season-checkbox:
    <input type="checkbox" th:each="season:${seasonList}" th:value="${season.submitValue}"
           th:text="${season.showForUserValue}" th:checked="${paige.seasonList.contains(season)}"/>
</form>
</body>
</html>